//
//  ByNoticeBallResultView.m
//  caipiao_ios
//
//  Created by mc on 2018/8/16.
//  Copyright © 2018年 ZhangZhanbin. All rights reserved.
//

#import "ByNoticeBallResultView.h"

@implementation ByNoticeBallResultView

- (id)init{
    self = [super init];
    if (self) {
        
        UILabel *centerLabel = [[UILabel alloc] init];
        [self addSubview:centerLabel];
        centerLabel.textColor = [UIColor blackColor];
        centerLabel.font = FONT(13);
        centerLabel.textAlignment = NSTextAlignmentCenter;
        [centerLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self).offset(0);
            make.centerY.equalTo(self).offset(0);
            make.size.mas_equalTo(CGSizeMake(55, 28));
        }];
        centerLabel.layer.borderColor = BY_LINE_COLOR.CGColor;
        centerLabel.layer.borderWidth = 1;
        
       
        UILabel *leftLabel = [[UILabel alloc] init];
        [self addSubview:leftLabel];
        leftLabel.textColor = [UIColor blackColor];
        leftLabel.font = FONT(13);
        leftLabel.textAlignment = NSTextAlignmentCenter;
        [leftLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self).offset(0);
            make.left.equalTo(self).offset(12);
            make.right.equalTo(centerLabel.mas_left).offset(-12);
            make.height.mas_equalTo(@28);
        }];
        leftLabel.layer.borderWidth = 1;
        leftLabel.layer.borderColor = BY_LINE_COLOR.CGColor;
        
        
        UILabel *rightLabel = [[UILabel alloc] init];
        [self addSubview:rightLabel];
        rightLabel.textColor = [UIColor blackColor];
        rightLabel.font = FONT(13);
        rightLabel.textAlignment = NSTextAlignmentCenter;
        [rightLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self).offset(0);
            make.right.equalTo(self).offset(-12);
            make.left.equalTo(centerLabel.mas_right).offset(12);
            make.height.mas_equalTo(@28);
        }];
        rightLabel.layer.borderWidth = 1;
        rightLabel.layer.borderColor = BY_LINE_COLOR.CGColor;
        
        self.leftLabel = leftLabel;
        self.centerLabel = centerLabel;
        self.rightLabel = rightLabel;
    }
    return self;
}

- (void)setNetModel:(ByNetModel *)netModel{
    _netModel = netModel;
    self.leftLabel.text = _netModel.h_cn_abbr;
    self.centerLabel.text = _netModel.final_score;
    self.rightLabel.text = _netModel.a_cn_abbr;
    
}

@end
